package com.amethyst.mybatisplus.join.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.Getter;

/**
 * @author Amethyst
 * @date 2021/8/23
 */
@Getter
public enum Sex {
    /**
     * 男
     */
    MAN(0, "男"),
    /**
     * 女
     */
    WOMAN(1, "女");

    @EnumValue
    private final int code;
    //    @JsonValue
    private final String desc;

    Sex(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    @Override
    public String toString() {
        return this.desc;
    }
}
